package com.ysh.springlogdemo1.controller;

import com.ysh.springlogdemo1.component.StudentComponent;
import com.ysh.springlogdemo1.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private  Student student;

    @RequestMapping("/getName")
    public String getName(){
        return student.getName();
    }
}
